package com.example.market;

import com.example.market.util.IdWorker;
import org.springframework.amqp.core.Queue;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling

public class MarketApplication {

    public static void main(String[] args) {
        SpringApplication.run(MarketApplication.class, args);
    }
    @Bean
    public IdWorker getIdWork() {
        return new IdWorker();
    }

    @Bean
    public Queue queue() {
        return new Queue("seckill_order",true);
    }

}
